package com.hmall.feign.common;

import com.hmall.domain.pojo.Address;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 用户地址远程调用接口
 * @Author XiaoJiangShi
 * @Date 2022/8/11 21:21
 * @Blog blog.XiaoJiangShi.net/996.mba
 * @Description:
 */
@FeignClient("userservice")
public interface AddressFeignClient {

    /**
     * 根据地址id查询地址信息
     *
     * @param id 地址id
     * @return 地址类
     */
    @GetMapping("/address/{id}")
    public Address findAddressById(@PathVariable("id") Long id);
}
